import log4js from "log4js";
import path   from "path";

import config from "../../config";

const env = process.env.NODE_ENV || 'local';
log4js.configure(config[env].log4js);

export default function logger(filename) {
    return log4js.getLogger(path.basename(filename));
}